﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace Kooboo.Commerce.Repositories
{
    public partial class EntityRepositories
    {

        public void Delete(IProductVariation productVariation)
        {
            if (productVariation != null)
            {
                var find = this.DataWriterContext.ProductVariations.Where(i => i.Id == productVariation.Id);
                //var items = find.SelectMany(i => i.ProductVariationItems);
                //this.DataContext.ProductVariationItems.DeleteAllOnSubmit(items);
                this.DataWriterContext.ProductVariations.DeleteAllOnSubmit(find);
            }
        }
    }
}
